﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Tweets.Library
{
    /// <summary>
    /// Tweet timeline settings.
    /// </summary>
    public class TweetSettings
    {
        /// <summary>
        /// Default constructor.
        /// </summary>
        public TweetSettings()
        {
            this.IncludeEntities = true;
            this.IncludeRetweets = false;
            this.TweetCountToFetch = 50;
        }

        /// <summary>
        /// Include retweets in the timeline?
        /// </summary>
        public bool IncludeRetweets { get; set; }

        /// <summary>
        /// Include entities (media, hashtags, user mentions, etc.) in the timeline?
        /// </summary>
        public bool IncludeEntities { get; set; }

        /// <summary>
        /// Number of tweets to fetch for each timeline request. Minimum of 1 and a maximum of 200.
        /// </summary>
        public int TweetCountToFetch
        {
            get { return _tweetCountToFetch; }
            set
            {
                if (value < 0)
                {
                    value = 1;
                }
                else if (value > 200)
                {
                    value = 200;
                }
                _tweetCountToFetch = value;
            }
        }

        private int _tweetCountToFetch;
    }
}
